package com.company.factory.abstract_;

public class Client {
    public static void main(String[] args) {
        System.out.println("====================小米系列产品====================");
        //小米工厂
        XiaomiFactory xiaomiFactory = new XiaomiFactory();
        IPhoneProduct iPhoneProduct = xiaomiFactory.phoneProduct();
        iPhoneProduct.start();
        iPhoneProduct.callUp();
        IRouterProduct iRouterProduct = xiaomiFactory.routerProduct();
        iRouterProduct.start();
        iRouterProduct.openWifi();

        System.out.println("====================华为系列产品====================");
        //华为工厂
        HuaweiFactory huaweiFactory = new HuaweiFactory();
        IPhoneProduct iPhoneProduct2 = huaweiFactory.phoneProduct();
        iPhoneProduct2.start();
        iPhoneProduct2.callUp();
        IRouterProduct iRouterProduct2 = huaweiFactory.routerProduct();
        iRouterProduct2.start();
        iRouterProduct2.openWifi();
    }
}
